<template>
  <div>
    <div class="top" @click="q">
      <div class="msg">
        <p class="nikename">{{ list.nickname }}</p>
        <p class="con">今天也是元气满满的一天</p>
      </div>
      <div class="headportrait">
        <img :src="list.url" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  created() {
    this.init();
  },

  computed: {
    ...mapState("xin", ["list"]),
  },

  methods: {
    ...mapActions("xin", ["init"]),
    q() {
      this.$router.push("/Updatainfor");
    },
  },
};
</script>

<style lang="scss" scoped>
.top {
  margin: 0 auto;
  margin-left: 0.63rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
}
.msg {
  width: 192px;
}
.nikename {
  height: 0.39rem;
  font-size: 0.4rem;
  font-family: PingFang SC;
  font-weight: 600;
  color: #333333;
  line-height: 1.3rem;
}
.con {
  margin-top: 0.22rem;
  height: 0.23rem;
  font-size: 0.24rem;
  font-family: PingFang SC;
  font-weight: 600;
  color: #333333;
  line-height: 1.3rem;
}

.headportrait {
  margin-right: 0.63rem;
  line-height: 20px;
  text-align: center;
  margin-left: 88px;
  margin-top: 15px;
  img {
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 50%;
  }
}
</style>
